package IC.SymbolTables.Types;


public class Symbol {

	private Kind _kind;
	private Type _type;
	private boolean _isStatic;
	
	public Symbol (Kind kind, Type type, boolean isStatic)
	{
		_kind = kind;
		_type = type;
		_isStatic = isStatic;
	}
	
	public Kind GetKind() { return _kind; }
	public Type GetType() { return _type; }
	public boolean IsStatic() { return _isStatic; } 
	
	public enum Kind
	{
		CLASS ("CLASS", 0),
		FIELD ("FIELD", 1),
		FORMAL ("FORMAL", 2),
		METHOD ("METHOD", 3),
		VARIABLE ("VARIABLE", 4);
		
		private String _string;
		private int _id;
		
		private Kind (String string, int id)
		{
			_id = id;
			_string = string;
		}
		
		public boolean equals(Kind kind) { return _id == kind._id; }
		public String toString() { return new String(_string); }
	}
}
